<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<!--公共无数据提示 开始-->
<section class="no-data__wrap no-cards-data__wrap" th:if="${#lists.isEmpty(dataMap['list'])}">
    <em>&nbsp;</em>
    <p>亲，还没有优惠券哦~~~</p>
</section>
<!--公共无数据提示 结束-->

<li th:if="${!#lists.isEmpty(dataMap['list'])}" th:each="couponCode : ${dataMap['list']}">
    <th:block th:if="couponCode!=null and ${couponCode['coupon']}!=null">
        <!-- 未过期 -->
        <div class="cards-yh-bx" th:if="${couponCode['status'] == 1 && (couponCode['timeType'] == 2  ||couponCode['coupon']['endDayNum'] > 0 )}">
            <div class="row no-gutter" th:attr="id=${couponCode['id']}">
                <section class="col-33">
                    <div class="text-center Coupon-red-bg">
                        <div class="mt5">
                            <span class="fs7" th:if="${couponCode['coupon']['type'] == 2}">￥</span>
                            <span class="fs7" th:if="${couponCode['coupon']['type'] == 1}">折</span>
                            <span class="uAccount-number">
                            <b th:text="${couponCode['coupon']['type']} == 2?${#strings.substringBefore(couponCode['coupon']['limitAtion'],'.')}:${couponCode['coupon']['limitAtion']}"></b>
                        </span>
                        </div>
                        <div class="pb5">
                            <span class="fs6" th:if="${couponCode['coupon']['type'] == 2}">代金券</span>
                            <span class="fs6" th:if="${couponCode['coupon']['type'] == 1}">折扣券</span>
                        </div>
                    </div>
                </section>
                <section class="col-66">
                    <div class="pl5">
                        <section class="fs7 ellipsis-rows">
                            <span class="c-333">消费满</span>
                            <span class="c-red" th:text="${#strings.substringBefore(couponCode['coupon']['minAmount'],'.')}"></span>
                            <span class="c-333">元时可用</span>
                        </section>
                        <div class="pt5 clearfix dashed " th:if="${couponCode['timeType'] == 1}">
                        <span class="pull-left fs4 c-888" th:if="${couponCode['coupon']['endDayNum'] > 3}">
                            <span th:text="${#strings.substring(couponCode['beginTime'],0,10)}"></span>
                            至
                            <span th:text="${#strings.substring(couponCode['endTime'],0,10)}"></span>
                        </span>
                            <span class="pull-right fs4 c-888" th:if="${couponCode['coupon']['endDayNum'] <= 3 && couponCode['coupon']['endDayNum'] > 0}">
                        剩 <small class="fs4 c-red" th:text="${couponCode['coupon']['endDayNum']}">天</small> 过期
                       </span>
                        </div>
                        <div class="pt5 clearfix dashed" th:if="${couponCode['timeType'] == 2}">
                        <span class="pull-left fs4 c-888">
                            有效期至 永远
                        </span>
                        </div>
                        <div class="row no-gutter">
                            <section class=" col-66 ellipsis" th:if="${couponCode['settingStatus']} == 2">
                                <span class="fs7 c-333">适用于所有商品</span>
                            </section>
                            <section class="col-66 ellipsis" th:if="${couponCode['settingStatus']} == 1">
                                <span class="fs7 c-333">查看适用商品范围</span>
                            </section>
                            <section class="col-33 text-right packUp" th:attrprepend="data-coupon=${couponCode['couponId']},data-id=${couponCode['id']}" th:if="${couponCode['settingStatus']} == 1">
                                <aside class="mr5">
                                    <span class="icon icon-down fs6 c-888"></span>
                                </aside>
                            </section>
                        </div>
                    </div>
                </section>
            </div>
            <div class="hide Coupon-about-desc__wrap" th:if="${couponCode['settingStatus']} == 1">
                <section class="pl5 pr5 pb5">
                    <section class="pt5">
                        <span th:attrprepend="id='show-shop-'+${couponCode['id']}" class="fs7 c-333">适用商品：
                        </span>
                    </section>
                </section>
            </div>
        </div>
        <!-- 已过期 -->
        <div class="cards-yh-bx cards-yh-disabled-bx" th:if="${couponCode['coupon']['endDayNum'] == 0 && couponCode['timeType'] == 1}">
            <div class="row no-gutter" th:attr="id=${couponCode['id']}">
                <section class="col-33">
                    <div class="text-center Coupon-gray-bg">
                        <div class="mt5">
                            <span class="fs7" th:if="${couponCode['coupon']['type'] == 2}">￥</span>
                            <span class="fs7" th:if="${couponCode['coupon']['type'] == 1}">折</span>
                            <span class="uAccount-number">
                            <b th:text="${couponCode['coupon']['type']} == 2?${#strings.substringBefore(couponCode['coupon']['limitAtion'],'.')}:${couponCode['coupon']['limitAtion']}"></b>
                        </span>
                        </div>
                        <div class="pb5">
                            <span class="fs6" th:if="${couponCode['coupon']['type'] == 2}">代金券</span>
                            <span class="fs6" th:if="${couponCode['coupon']['type'] == 1}">折扣券</span>
                        </div>
                    </div>
                </section>
                <section class="col-66">
                    <div class="pl5">
                        <section class="fs7 ellipsis-rows">
                            <span class="c-333">消费满</span>
                            <span class="c-red" th:text="${#strings.substringBefore(couponCode['coupon']['minAmount'],'.')}"></span>
                            <span class="c-333">元时可用</span>
                        </section>

                        <div class="pt5 clearfix dashed">
                        <span class="pull-left fs4 c-888">
                            已过期&nbsp;
                        </span>
                            <div class="pull-left fs4 c-888" th:if="${couponCode['timeType'] == 1}">
                                <span th:text="${#strings.substring(couponCode['beginTime'],0,10)}"></span>
                                至
                                <span th:text="${#strings.substring(couponCode['endTime'],0,10)}"></span>
                            </div>
                        </div>
                        <div class="row no-gutter">
                            <section class=" col-66 ellipsis" th:if="${couponCode['settingStatus']} == 2">
                                <span class="fs6 c-333">适用于所有商品</span>
                            </section>
                            <section class="col-66 ellipsis" th:if="${couponCode['settingStatus']} == 1">
                                <span class="fs6 c-333">查看适用商品范围</span>
                            </section>
                            <section class="col-33 text-right packUp" th:attrprepend="data-coupon=${couponCode['couponId']},data-id=${couponCode['id']}" th:if="${couponCode['settingStatus']} == 1">
                                <aside class="mr5">
                                    <span class="icon icon-down fs6 c-888"></span>
                                </aside>
                            </section>
                        </div>
                    </div>
                </section>
            </div>
            <div class="hide Coupon-about-desc__wrap" th:if="${couponCode['settingStatus']} == 1">
                <section class="pl5 pr5 pb5">
                    <section class="pt5">
                        <span class="fs6 c-333" th:attrprepend="id='show-shop-'+${couponCode['id']}">适用商品：
                        </span>
                    </section>
                </section>
            </div>
        </div>
        <!-- 已使用 -->
        <div class="cards-yh-bx cards-yh-disabled-bx" th:if="${couponCode['status'] == 5}">
            <div class="row no-gutter" th:attr="id=${couponCode['id']}">
                <section class="col-33">
                    <div class="text-center Coupon-gray-bg">
                        <div class="mt5">
                            <span class="fs7" th:if="${couponCode['coupon']['type'] == 2}">￥</span>
                            <span class="fs7" th:if="${couponCode['coupon']['type'] == 1}">折</span>
                            <span class="uAccount-number">
                            <b th:text="${couponCode['coupon']['type']} == 2?${#strings.substringBefore(couponCode['coupon']['limitAtion'],'.')}:${couponCode['coupon']['limitAtion']}"></b>
                        </span>
                        </div>
                        <div class="pb5">
                            <span class="fs6" th:if="${couponCode['coupon']['type'] == 2}">代金券</span>
                            <span class="fs6" th:if="${couponCode['coupon']['type'] == 1}">折扣券</span>
                        </div>
                    </div>
                </section>
                <section class="col-66">
                    <div class="pl5">
                        <section class="fs7 ellipsis-rows">
                            <span class="c-333">消费满</span>
                            <span class="c-red" th:text="${#strings.substringBefore(couponCode['coupon']['minAmount'],'.')}"></span>
                            <span class="c-333">元时可用</span>
                        </section>

                        <div class="pt5 clearfix dashed">
                        <span class="pull-left fs4 c-888">
                            已使用
                        </span>
                        </div>
                        <div class="row no-gutter">
                            <section class=" col-66 ellipsis" th:if="${couponCode['settingStatus']} == 2">
                                <span class="fs6 c-333">适用于所有商品</span>
                            </section>
                            <section class="col-66 ellipsis" th:if="${couponCode['settingStatus']} == 1">
                                <span class="fs6 c-333">查看适用商品范围</span>
                            </section>
                            <section class="col-33 text-right packUp" th:attrprepend="data-coupon=${couponCode['couponId']},data-id=${couponCode['id']}" th:if="${couponCode['settingStatus']} == 1">
                                <aside class="mr5">
                                    <span class="icon icon-down fs6 c-888"></span>
                                </aside>
                            </section>
                        </div>
                    </div>
                </section>
            </div>
            <div class="hide Coupon-about-desc__wrap" th:if="${couponCode['settingStatus']} == 1">
                <section class="pl5 pr5 pb5">
                    <section class="pt5">
                        <span class="fs6 c-333" th:attrprepend="id='show-shop-'+${couponCode['id']}">适用商品：
                        </span>
                    </section>
                </section>
            </div>
        </div>
        <!-- 已作废 -->
        <div class="cards-yh-bx cards-yh-disabled-bx" th:if="${couponCode['status'] == 4 || couponCode['status'] == 2 || couponCode['status'] == 3}">
            <div class="row no-gutter" th:attr="id=${couponCode['id']}">
                <section class="col-33">
                    <div class="text-center Coupon-gray-bg">
                        <div class="mt5">
                            <span class="fs7" th:if="${couponCode['coupon']['type'] == 2}">￥</span>
                            <span class="fs7" th:if="${couponCode['coupon']['type'] == 1}">折</span>
                            <span class="uAccount-number">
                            <b th:text="${couponCode['coupon']['type']} == 2?${#strings.substringBefore(couponCode['coupon']['limitAtion'],'.')}:${couponCode['coupon']['limitAtion']}"></b>
                        </span>
                        </div>
                        <div class="pb5">
                            <span class="fs6" th:if="${couponCode['coupon']['type'] == 2}">代金券</span>
                            <span class="fs6" th:if="${couponCode['coupon']['type'] == 1}">折扣券</span>
                        </div>
                    </div>
                </section>
                <section class="col-66">
                    <div class="pl5">
                        <section class="fs7 ellipsis-rows">
                            <span class="c-333">消费满</span>
                            <span class="c-red" th:text="${#strings.substringBefore(couponCode['coupon']['minAmount'],'.')}"></span>
                            <span class="c-333">元时可用</span>
                        </section>

                        <div class="pt5 clearfix dashed">
                        <span class="pull-left fs4 c-888">
                            已作废
                        </span>
                        </div>
                        <div class="row no-gutter">
                            <section class=" col-66 ellipsis" th:if="${couponCode['settingStatus']} == 2">
                                <span class="fs6 c-333">适用于所有商品</span>
                            </section>
                            <section class="col-66 ellipsis" th:if="${couponCode['settingStatus']} == 1">
                                <span class="fs6 c-333">查看适用商品范围</span>
                            </section>
                            <section class="col-33 text-right packUp" th:attrprepend="data-coupon=${couponCode['couponId']},data-id=${couponCode['id']}" th:if="${couponCode['settingStatus']} == 1">
                                <aside class="mr5">
                                    <span class="icon icon-down fs6 c-888"></span>
                                </aside>
                            </section>
                        </div>
                    </div>
                </section>
            </div>
            <div class="hide Coupon-about-desc__wrap" th:if="${couponCode['settingStatus']} == 1">
                <section class="pl5 pr5 pb5">
                    <section class="pt5">
                        <span class="fs6 c-333" th:attrprepend="id='show-shop-'+${couponCode['id']}">适用商品：
                        </span>
                    </section>
                </section>
            </div>
        </div>
    </th:block>
</li>
<input type="hidden" id="totalPages" th:value="${dataMap['pages']}"/>
<input type="hidden" id="currentPage" th:value="${dataMap['pageNum']}"/>
</html>
